package com.jly.controller;

import com.jly.service.RadarService;
import com.jly.vos.GuidanceDataVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Liwenhao
 * @date 2022/3/24 9:55
 * @description
 */
@RestController
@RequestMapping("/radar")
public class RadarController {

    @Autowired
    private RadarService radarService;

    @GetMapping("/detect/{id}")
    public Object detect(@PathVariable String id){
        return radarService.detect(id);
    }

    @PostMapping("/guide")
    public Object guide(@RequestBody GuidanceDataVo guidanceDataVo){
        return radarService.guide(guidanceDataVo);
    }

}
